<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
	<head>
		<title>页面标题</title>
		<%@ include file="/commons/meta.jsp"%>
		<script language=javascript src="${ctx}/scripts/date/wpCalendar.js"></script>
		<script language="JavaScript" src="${ctx}/scripts/home/common.js"></script>
		
		<script type="text/javascript">
			/**验证和提交表单*/
			function validate(){
				var msg = "";
				var column1 = document.ProcessNodeForm.column1.value;
				var column1P = /^[0-9]{1,20}$/;
				if(!column1P.exec(column1)){msg += "--ID必须为数字;\n";}

				var proInsId = document.ProcessNodeForm.proInsId.value;
				var proInsIdP = /^[0-9]{1,20}$/;
				if(!proInsIdP.exec(proInsId)){msg += "--流程实例ID必须为数字;\n";}

				var name = document.ProcessNodeForm.name.value;
				if(name == "") {msg += "--节点名称不能为空;\n";} else if(name.length > 20){msg += "--节点名称长度不能超过20个字符;\n";}

				var assignee = document.ProcessNodeForm.assignee.value;
				var assigneeP = /^[0-9]{1,20}$/;
				if(!assigneeP.exec(assignee)){msg += "--执行人必须为数字;\n";}

				var formUrl = document.ProcessNodeForm.formUrl.value;
				if(formUrl == "") {msg += "--表单地址不能为空;\n";} else if(formUrl.length > 20){msg += "--表单地址长度不能超过20个字符;\n";}

				var createDate = document.ProcessNodeForm.createDate.value;
				if(createDate == "") {msg += "--创建日期不能为空;\n";}

				var dueDate = document.ProcessNodeForm.dueDate.value;
				if(dueDate == "") {msg += "--完成日期不能为空;\n";}

				var hbTask = document.ProcessNodeForm.hbTask.value;
				if(hbTask == "") {msg += "--是否备选任务不能为空;\n";} else if(hbTask.length > 20){msg += "--是否备选任务长度不能超过20个字符;\n";}

				var nodeFlag = document.ProcessNodeForm.nodeFlag.value;
				if(nodeFlag == "") {msg += "--流程节点标识不能为空;\n";} else if(nodeFlag.length > 20){msg += "--流程节点标识长度不能超过20个字符;\n";}

				var nodeType = document.ProcessNodeForm.nodeType.value;
				if(nodeType == "") {msg += "--流程节点类型不能为空;\n";} else if(nodeType.length > 20){msg += "--流程节点类型长度不能超过20个字符;\n";}

				var expression = document.ProcessNodeForm.expression.value;
				if(expression == "") {msg += "--表达式不能为空;\n";} else if(expression.length > 20){msg += "--表达式长度不能超过20个字符;\n";}

				var status = document.ProcessNodeForm.status.value;
				if(status == "") {msg += "--状态不能为空;\n";} else if(status.length > 20){msg += "--状态长度不能超过20个字符;\n";}

				var visiable = document.ProcessNodeForm.visiable.value;
				if(visiable == "") {msg += "--可见状态不能为空;\n";} else if(visiable.length > 20){msg += "--可见状态长度不能超过20个字符;\n";}

				if(msg != "") {alert(msg);} else {document.ProcessNodeForm.submit();}

			}
			function winclose(){
			    if(isWinClose()){
			      validate();
			    }else{
			       history.back();
			    }
			}
		</script>
	</head>
	<body>

		<div class="albox">
			<!--统一信息头部开始-->
			<ul>
				<li>
					<img src="${templateVo.styleImagePath}/list9.gif" />
				</li>
				<li style="width: 99%">
					<table width="100%" border="0" cellspacing="0" cellpadding="0"
						align="center" class="albox1">
						<tr>
							<td width="2%" align="right" height="31">
								<img src="${templateVo.styleImagePath}/ico_clock3.gif" />
							</td>
							<td width="4%">
								<a href="javascript:void(validate())">保存</a>
							</td>
							<td width="2%">
								<img src="${templateVo.styleImagePath}/ico_clock1.gif" />
							</td>
							<td width="4%">
								<a href="javascript:void(winclose())">返回</a>
							</td>
							<td width="84%"></td>
						</tr>
					</table>
				</li>
				<li style="float: right;">
					<img src="${templateVo.styleImagePath}/list10.gif" />
				</li>
			</ul>
			<!--统一信息头部结束-->
		</div>

		<div style="width: 98%; float: left;">
			<table width="98%" border="0" cellspacing="0" cellpadding="0"
				align="center">
				<tr>
					<td class="edittit" align="center">
						XX编辑
					</td>
				</tr>
				<tr>
					<td align="center">
						&nbsp;
					</td>
				</tr>
			</table>
			<html:form action="/ProcessNodeAction.do" styleClass="form">
				<input type="hidden" name="method" value="save" />
				<html:hidden property="id" />
				<table width="98%" border="1" cellspacing="1" cellpadding="2">
				    
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>ID：</td>
						<td bgcolor='#Ffffff'><html:text property="column1" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>流程实例ID：</td>
						<td bgcolor='#Ffffff'><html:text property="proInsId" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>节点名称：</td>
						<td bgcolor='#Ffffff'><html:text property="name" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>执行人：</td>
						<td bgcolor='#Ffffff'><html:text property="assignee" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>表单地址：</td>
						<td bgcolor='#Ffffff'><html:text property="formUrl" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>创建日期：<onfocus="showCalendar(this)" readonly="true"ffff'><html:text property="createDate" onfocus="showCalendar(this)" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'onfocus="showCalendar(this)" readonly="true"or='#Ffffff'><html:text property="dueDate" onfocus="showCalendar(this)" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>是否备选任务：</td>
						<td bgcolor='#Ffffff'><html:text property="hbTask" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>流程节点标识：</td>
						<td bgcolor='#Ffffff'><html:text property="nodeFlag" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>流程节点类型：</td>
						<td bgcolor='#Ffffff'><html:text property="nodeType" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>表达式：</td>
						<td bgcolor='#Ffffff'><html:text property="expression" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>状态：</td>
						<td bgcolor='#Ffffff'><html:text property="status" styleClass="text"/><font color=red>(*)</font></td>
					</tr>
					<tr class=tr001>
						<td width=12% class='text12_1' align=right bgcolor='#F7F7F7'>可见状态：</td>
						<td bgcolor='#Ffffff'><html:text property="visiable" styleClass="text"/><font color=red>(*)</font></td>
					</tr>

				</table>
			</html:form>
		</div>
	</body>
</html>
